VideoStreamService

VideoStreamService provides API related to requesting a custom configuration of streams of remote video. t can be used to create custom video layouts and enable use cases for which the default video layouts are not suitable

Properties

Link copied to clipboard
abstract val videoStreamConfigurations: List<VideoStreamConfiguration>

Returns the last successfully applied VideoStreamConfiguration request.

Link copied to clipboard
abstract val videoStreams: ObservableValue<List<VideoStream>>

The streams of video being received by the client. An observable array of VideoStream. Important: There is no guarantee on the ordering of this array, relying on the ordering of this array may result in more layout changes than necessary. This array is the source of truth for the actual videos being received. The exact request to setVideoStreamConfiguration(videoConfigurations: List) may not be honoured exactly. It is recommended to update the client’s UI based on this array.

Functions

Link copied to clipboard
abstract fun attachParticipantToView(participantGuid: String, view: TextureView): AttachParticipantStreamResult

Attaches a participant video to a view.This will cause the stream of video to be rendered and visible in the given view. Should only be called for videos in the videoStreams array.A video may only be attached to one view at a time. Calling this method on a stream that is already attached will implicitly call the detachParticipantStreamFromView(participantGuid: String) method first.

Link copied to clipboard
abstract fun detachParticipantFromView(participantGuid: String): DetachParticipantStreamResult

Detaches (removes) the video stream from the view it is attached to. This will stop rendering the view and it will no longer be visible.

Link copied to clipboard
abstract fun pauseRendering()

Pause all participants video rendering.

Link copied to clipboard
abstract fun resumeRendering()

Resume all paused video rendering.

Link copied to clipboard
abstract fun setVideoStreamConfiguration(videoConfigurations: List<VideoStreamConfiguration>): VideoStreamConfigurationResult

Requests a configuration of video to be received by the client. Allows specification of the number of streams of video received, the quality of those videos, the priorities of those videos and which participants are included in the streams.

Link copied to clipboard
abstract fun setVideoStreamStyle(videoStreamStyle: VideoStreamStyle)

Sets the style for attaching video participants. This will change how the video is rendered within the provided view while maintaining the aspect ratio. Setting the mode will only affect views attached after the default is set. Supported values are VideoStreamStyle.FIT_TO_VIEW and VideoStreamStyle.SCALE_AND_CROP.